package com.liuzh.kaoyanspringboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户文章收藏关联表
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-15
 */
@Getter
@Setter
  @TableName("t_collect")
public class Collect implements Serializable {

    private static final long serialVersionUID = 1L;

      /**
     * id
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      /**
     * 收藏夹名称
     */
      private String collectName;

      /**
     * 用户id
     */
      private Integer userId;

      /**
     * 创建时间
     */
      private String createTime;
      @TableField(exist = false)
      private String username;

  @Override
  public String toString() {
    return "Collect{" +
            "id=" + id +
            ", collectName='" + collectName + '\'' +
            ", userId=" + userId +
            ", createTime='" + createTime + '\'' +
            ", articleList=" + articleList +
            '}';
  }

  @TableField(exist = false)
      private List<Article> articleList;
}
